package cheme.ProcessEditor.Parts.Streams.Tag;

import org.eclipse.draw2d.Polyline;
import org.eclipse.gef.EditPart;
import org.eclipse.gef.Request;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.requests.CreateRequest;

import cheme.ProcessEditor.Policies.ToolbarLayoutEditPolicy;

public class PolicyDummyLayout extends ToolbarLayoutEditPolicy
{
	@Override
	protected Command createAddCommand(EditPart child, EditPart after)
	{
		return null;
	}

	@Override
	protected Command createMoveChildCommand(EditPart child, EditPart after)
	{
		return null;
	}

	@Override
	protected Command getCreateCommand(CreateRequest request)
	{
		return null;
	}

	@Override
	protected void eraseLayoutTargetFeedback(Request request)
	{
		// TODO Auto-generated method stub
		super.eraseLayoutTargetFeedback(request);
	}

	@Override
	protected int getFeedbackIndexFor(Request request)
	{
		// TODO Auto-generated method stub
//		return super.getFeedbackIndexFor(request);
		return -1;
	}

	@Override
	protected EditPart getInsertionReference(Request request)
	{
		// TODO Auto-generated method stub
//		return super.getInsertionReference(request);
		return null;
	}

	@Override
	protected Polyline getLineFeedback()
	{
		// TODO Auto-generated method stub
//		return super.getLineFeedback();
		return null;
	}

	@Override
	protected void showLayoutTargetFeedback(Request request)
	{
		// TODO Auto-generated method stub
		//super.showLayoutTargetFeedback(request);
	}

	@Override
	public void eraseTargetFeedback(Request request)
	{
		// TODO Auto-generated method stub
//		super.eraseTargetFeedback(request);
	}

	@Override
	public Command getCommand(Request request)
	{		
//		if(REQ_MOVE_CHILDREN.equals(request.getType()))
//		{
//			return getMoveChildrenCommand(request);
//		}
//		
//		return super.getCommand(request);
		
		return null;
	}
	
//	/**
//	 * A move is interpreted here as a change in order of the children. This method obtains
//	 * the proper index, and then calls {@link #createMoveChildCommand(EditPart, EditPart)},
//	 * which subclasses must implement. Subclasses should not override this method.
//	 * @see LayoutEditPolicy#getMoveChildrenCommand(Request)
//	 */
//	protected Command getMoveChildrenCommand(Request request)
//	{
//		ChangeBoundsRequest newReq = new ChangeBoundsRequest(request.getType());
//		newReq.setEditParts(getHost());
//		return getHost().getParent().getCommand(request);
//		
////		CompoundCommand command = new CompoundCommand();
////		List editParts = ((ChangeBoundsRequest)request).getEditParts();
////		
////		EditPart insertionReference = getInsertionReference(request);
////		for (int i = 0; i < editParts.size(); i++) {
////			EditPart child = (EditPart)editParts.get(i);
////			command.add(createMoveChildCommand(child, insertionReference));
////		}
////		return command.unwrap();
//	}
}
